#!/bin/sh
exec 2>&1

cd <%= node['gitlab']['logrotate']['dir'] %>

exec /opt/gitlab/embedded/bin/chpst -P /usr/bin/env \
  dir=<%= node['gitlab']['logrotate']['dir'] %> \
  pre_sleep=<%= node['gitlab']['logrotate']['pre_sleep'] %> \
  post_sleep=<%= node['gitlab']['logrotate']['post_sleep'] %> \
  /opt/gitlab/embedded/bin/gitlab-logrotate-wrapper
